#ifndef WSCAIRCRAFTKMLWAYPOINTS_H
#define WSCAIRCRAFTKMLWAYPOINTS_H

#include "wscrequesthandler.h"
#include "../FsxWsUtils/httphelper.h"

namespace FsxWebService {

//! Aircrafts as KML waypoints
class WscAircraftKmlWaypoints : public WscRequestHandler
{
    Q_OBJECT
    Q_DISABLE_COPY(WscAircraftKmlWaypoints)

private:
    KmlSettings _kmlSettings; /*!< KML settings */
    //! Get the query parameters
    /*! \param request
        \param id
        \param waypointResolutionMs
        \param waypointsMax
        \param reloading */
    void getParameters(HttpRequest &request, int &id, int &waypointResolutionMs, int &waypointsMax, bool &reloading);
public:
    //! Constructor
    /*! \param kmlSettings
        \param port
        \param serverUrl
        \param path
        \param parent Qt parent object */
    WscAircraftKmlWaypoints(const KmlSettings &kmlSettings, const int port, const QString &serverUrl, const QString &path, QObject *parent=0);
    //! Web server service method.
    /*! \param request
        \param response */
    void service(HttpRequest& request, HttpResponse& response);
signals:
    //! KML waypoints of aircraft with id.
    /*! \param parameter KML parameters */
    QString const signalAircraftKmlWaypoints(const KmlParameter &parameter);
};
}
#endif // WSCAIRCRAFTKMLWAYPOINTS_H
